from django.db import models

# Create your models here.
class Teacher(models.Model):
    name=models.CharField(max_length=20)#姓名
    gender=models.CharField(max_length=20)#性别
    college=models.CharField(max_length=20)#学院
    major=models.CharField(max_length=20)#专业
    direction=models.CharField(max_length=50)#研究方向
    email=models.CharField(max_length=50)#电子邮箱
    intro=models.TextField(max_length=1000)#个人简介
    photo=models.TextField(max_length=1000)#头像


    def __str__(self):
        return"%s,%s,%s,%s,%s,%s,%s,%s\n"%(
            self.name,
            self.gender,
            self.college,
            self.major,
            self.direction,
            self.email,
            self.intro,
            self.photo
        )
